from socket import *
from time import ctime

HOST = ''
PORT = 2456
BUFSIZE = 1024
ADDR = (HOST, PORT)

udpSocket = socket(AF_INET, SOCK_DGRAM)
udpSocket.bind(ADDR)

while True:
    print 'waiting client send message...'
    data,addr = udpSocket.recvfrom(BUFSIZE)

    udpSocket.sendto('[%s] %s' %(ctime(),data), addr)
    print 'received from and returned to:',addr

udpSocket.close()
